package com.beidouapp.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.beidouapp.domain.example.RoleAndResourceExample;
import com.beidouapp.domain.pojo.Resource;
import com.beidouapp.domain.pojo.RoleAndResource;

public interface RoleAndResourceManager
{
	int countByExample(RoleAndResourceExample example);

	int deleteByExample(RoleAndResourceExample example);

	int insert(RoleAndResource record);

	int insertSelective(RoleAndResource record);

	List<RoleAndResource> selectByExample(RoleAndResourceExample example);

	int updateByExampleSelective(@Param("record") RoleAndResource record, @Param("example") RoleAndResourceExample example);

	int updateByExample(@Param("record") RoleAndResource record, @Param("example") RoleAndResourceExample example);
	
	/**
	 * 根据角色ID获取资源列表
	 * @param roleId
	 * @return
	 */
	public List<Resource> findRoleResourcesByRoleId(Integer roleId);
}
